gdk_display_manager_get_type G_GNUC_CONST
gdk_display_manager_list_displays
gdk_display_manager_set_default_display
+gdk_display_notify_startup_complete
gdk_display_open
gdk_display_open_default_libgtk_only
gdk_display_peek_event
{
return GDK_DISPLAY_GET_CLASS (display)->get_next_serial (display);
}
+
+
+/**
+ * gdk_notify_startup_complete:
+ *
+ * Indicates to the GUI environment that the application has finished
+ * loading. If the applications opens windows, this function is
+ * normally called after opening the application's initial set of
+ * windows.
+ *
+ * GTK+ will call this function automatically after opening the first
+ * #GtkWindow unless gtk_window_set_auto_startup_notification() is called
+ * to disable that feature.
+ *
+ * Since: 2.2
+ **/
+void
+gdk_notify_startup_complete (void)
+{
+ gdk_notify_startup_complete_with_id (NULL);
+}
+
+/**
+ * gdk_notify_startup_complete_with_id:
+ * @startup_id: a startup-notification identifier, for which notification
+ * process should be completed
+ *
+ * Indicates to the GUI environment that the application has finished
+ * loading, using a given identifier.
+ *
+ * GTK+ will call this function automatically for #GtkWindow with custom
+ * startup-notification identifier unless
+ * gtk_window_set_auto_startup_notification() is called to disable
+ * that feature.
+ *
+ * Since: 2.12
+ */
+void
+gdk_notify_startup_complete_with_id (const gchar* startup_id)
+{
+ GdkDisplay *display;
+
+ display = gdk_display_get_default ();
+ if (display)
+ gdk_display_notify_startup_complete (display, startup_id);
+}
+
+void
+gdk_display_notify_startup_complete (GdkDisplay *display,
+ const gchar *startup_id)
+{
+ GDK_DISPLAY_GET_CLASS (display)->notify_startup_complete (display, startup_id);
+}
gboolean gdk_display_supports_shapes (GdkDisplay *display);
gboolean gdk_display_supports_input_shapes (GdkDisplay *display);
gboolean gdk_display_supports_composite (GdkDisplay *display);
+void gdk_display_notify_startup_complete (GdkDisplay *display,
+ const gchar *startup_id);
GdkDeviceManager * gdk_display_get_device_manager (GdkDisplay *display);
GdkAppLaunchContext *gdk_display_get_app_launch_context (GdkDisplay *display);
-
G_END_DECLS
#endif /* __GDK_DISPLAY_H__ */
gulong (*get_next_serial) (GdkDisplay *display);
+ void (*notify_startup_complete) (GdkDisplay *display,
+ const gchar *startup_id);
+
/* Signals */
void (*closed) (GdkDisplay *display,
gboolean is_error);
va_end (ap);
broadcast_xmessage (display,
- "_NET_STARTUP_INFO",
+ "_NET_STARTUP_INFO",
"_NET_STARTUP_INFO_BEGIN",
message->str);
g_string_free (message, TRUE);
}
-/**
- * gdk_notify_startup_complete:
- *
- * Indicates to the GUI environment that the application has finished
- * loading. If the applications opens windows, this function is
- * normally called after opening the application's initial set of
- * windows.
- *
- * GTK+ will call this function automatically after opening the first
- * #GtkWindow unless gtk_window_set_auto_startup_notification() is called
- * to disable that feature.
- *
- * Since: 2.2
- **/
-void
-gdk_notify_startup_complete (void)
-{
- GdkDisplay *display;
- GdkDisplayX11 *display_x11;
-
- display = gdk_display_get_default ();
- if (!display)
- return;
-
- display_x11 = GDK_DISPLAY_X11 (display);
-
- if (display_x11->startup_notification_id == NULL)
- return;
-
- gdk_notify_startup_complete_with_id (display_x11->startup_notification_id);
-}
-
-/**
- * gdk_notify_startup_complete_with_id:
- * @startup_id: a startup-notification identifier, for which notification
- * process should be completed
- *
- * Indicates to the GUI environment that the application has finished
- * loading, using a given identifier.
- *
- * GTK+ will call this function automatically for #GtkWindow with custom
- * startup-notification identifier unless
- * gtk_window_set_auto_startup_notification() is called to disable
- * that feature.
- *
- * Since: 2.12
- **/
-void
-gdk_notify_startup_complete_with_id (const gchar* startup_id)
+static void
+gdk_x11_display_notify_startup_complete (GdkDisplay *display,
+ const gchar *startup_id)
{
- GdkDisplay *display;
-
- display = gdk_display_get_default ();
- if (!display)
- return;
+ if (startup_id == NULL)
+ {
+ startup_id = GDK_DISPLAY_X11 (display)->startup_notification_id;
+ if (startup_id == NULL)
+ return;
+ }
gdk_x11_display_broadcast_startup_message (display, "remove",
- "ID", startup_id,
- NULL);
+ "ID", startup_id,
+ NULL);
}
static gboolean
display_class->before_process_all_updates = _gdk_x11_display_before_process_all_updates;
display_class->after_process_all_updates = _gdk_x11_display_after_process_all_updates;
display_class->get_next_serial = gdk_x11_display_get_next_serial;
+ display_class->notify_startup_complete = gdk_x11_display_notify_startup_complete;
}